﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Produtos.aspx.cs" Inherits="AuctionSite.Produtos" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="Produtos.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager runat="server">
    </asp:ScriptManager>
    <asp:MultiView ID="mvProdutos" runat="server" EnableTheming="True" ActiveViewIndex="0">
        <asp:View ID="vwCategorias" runat="server">
            <fieldset>
                <legend>Categorias</legend>
                <asp:GridView ID="gridCategoria" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    DataKeyNames="Id" ForeColor="#333333" Width="100%" GridLines="None" ShowHeader="False">
                    <Columns>
                        <asp:BoundField DataField="Id" Visible="False" />
                        <asp:BoundField DataField="Nome" Visible="False" />
                        <asp:HyperLinkField DataNavigateUrlFields="Id" DataTextField="Nome" DataNavigateUrlFormatString="~/Produtos.aspx?cat={0}" />
                    </Columns>
                </asp:GridView>
            </fieldset>
        </asp:View>
        <asp:View ID="vwSubCategorias" runat="server">
            <fieldset>
                <legend>SubCategorias</legend>
                <asp:GridView ID="gridSubCategoria" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    DataKeyNames="Id" ForeColor="#333333" Width="100%" GridLines="None" ShowHeader="False">
                    <Columns>
                        <asp:BoundField DataField="Id" Visible="False" />
                        <asp:BoundField DataField="Nome" Visible="False" />
                        <asp:BoundField DataField="CategoriaId" Visible="False" />
                        <asp:HyperLinkField DataNavigateUrlFields="CategoriaId,Id" DataTextField="Nome" DataNavigateUrlFormatString="~/Produtos.aspx?cat={0}&subCat={1}" />
                    </Columns>
                </asp:GridView>
            </fieldset>
        </asp:View>
        <asp:View ID="vwProduto" runat="server">
            <fieldset>
                <legend>Lista de Produtos</legend>
                <asp:GridView ID="gridProduto" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    DataKeyNames="Id" ForeColor="#333333" Width="100%" OnRowDataBound="gridProduto_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="Id" Visible="False" />
                        <asp:BoundField DataField="CategoriaId" Visible="False" />
                        <asp:BoundField DataField="SubCategoriaId" Visible="False" />
                        <asp:ImageField DataImageUrlField="Imagem1" Visible="true" ControlStyle-Height="60px"
                            ControlStyle-Width="60px" HeaderStyle-Width="60px" />
                        <asp:BoundField DataField="Nome" Visible="True" HeaderText="Nome" HeaderStyle-Width="200px" />
                        <asp:BoundField DataField="Descricao" Visible="True" HeaderText="Descrição" />
                        <asp:BoundField DataField="Valor" Visible="True" HeaderText="Valor Inicial" HeaderStyle-Width="100px" />
                        <asp:BoundField DataField="" Visible="True" HeaderText="Tipo Leilão" HeaderStyle-Width="100px" />
                        <asp:BoundField DataField="" Visible="True" HeaderText="Último Lance" HeaderStyle-Width="100px" />
                        <asp:HyperLinkField DataNavigateUrlFields="CategoriaId,SubCategoriaId,Id" Text="Dar Lance"
                            HeaderStyle-Width="60px" DataNavigateUrlFormatString="~/Produtos.aspx?cat={0}&subCat={1}&produto={2}" />
                    </Columns>
                </asp:GridView>
            </fieldset>
        </asp:View>
        <asp:View ID="vwLance" runat="server">
            <fieldset>
                <legend>Lance</legend>
                <table>
                    <tr>
                        <td colspan="3">
                            <asp:Image runat="server" ID="imgProduto" Height="100px" Width="100px" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Produto:</strong>
                        </td>
                        <td colspan="2">
                            <asp:HiddenField runat="server" ID="hdnProdutoId" />
                            <asp:Label runat="server" ID="lblProdutoNome" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Descrição:</strong>
                        </td>
                        <td colspan="2">
                            <asp:Label runat="server" ID="lblProdutoDesc" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Tipo de Leilão:</strong>
                        </td>
                        <td colspan="2">
                            <asp:Label runat="server" ID="lblProdutoTipo" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Valor:</strong>
                        </td>
                        <td colspan="2">
                            <asp:Label runat="server" ID="lblProdutoValor" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Lance:</strong>
                        </td>
                        <td>
                            <asp:TextBox runat="server" ID="txtProduto" />
                        </td>
                        <td>
                            <asp:Button runat="server" ID="btnLance" Text="Dar Lance" OnClick="btnLance_Click" />
                        </td>
                    </tr>
                </table>
            </fieldset>
        </asp:View>
    </asp:MultiView>
</asp:Content>
